<wx:page
 class="x-page"
 id="page"
 style="background-color:#F3F3F3"
 xmlns:bind="http://www.wex5.com/wx/bind"
 xmlns:catch="http://www.wex5.com/wx/event/catch"
 xmlns:on="http://www.wex5.com/wx/event/on"
 xmlns:wx="$UI/wxsys/comps">
<wx:model
 id="model"
 style="left:0px;top:0px;height:auto;position:absolute">
<wx:wxApi
 id="wxapi"
 label="通用接口"/>
<wx:commonOperation
 id="commonOperation"
 label="操作扩展"
 xmlns:wx="$UI/wxsys/comps"/>
<wx:restData
 _created="true"
 auto="new"
 className="/main/shangpin1"
 id="restData1"
 label="商品"
 url="/dbrest"
 xmlns:bind="http://www.wex5.com/wx/bind"
 xmlns:catch="http://www.wex5.com/wx/event/catch"
 xmlns:on="http://www.wex5.com/wx/event/on">
<rule
 id="rule1">
<col
 id="default13"
 name="fkucun"
 xid="xid_1549540737133_2">
<defaultValue
 id="default14">
<expr
 id="default15"><![CDATA[1]]></expr></defaultValue></col>
<col
 id="default16"
 name="fmaijiaid"
 xid="xid_1549540737136_3">
<defaultValue
 id="default17">
<expr
 id="default18"><![CDATA[restData.current.id/*{"dependencies":["user"]}*/]]></expr></defaultValue></col>
<col
 id="default19"
 name="ftupian"
 xid="xid_1549540737137_4">
<required
 id="default20">
<expr
 id="default21"><![CDATA[true]]></expr>
<message
 id="default22"><![CDATA[必须插入至少一张图片]]></message></required></col>
<col
 id="default23"
 name="fmingcheng"
 xid="xid_1549540737138_5">
<required
 id="default24">
<expr
 id="default25"><![CDATA[true]]></expr>
<message
 id="default26"><![CDATA[必须填写商品名称]]></message></required></col>
<col
 id="default27"
 name="fjianjie"
 xid="xid_1549540737139_6">
<required
 id="default28">
<expr
 id="default29"><![CDATA[true]]></expr>
<message
 id="default30"><![CDATA[必须填写商品简介]]></message></required></col>
<col
 id="default31"
 name="fjiage"
 xid="xid_1549540737139_7">
<required
 id="default32">
<expr
 id="default33"><![CDATA[true]]></expr>
<message
 id="default34"><![CDATA[必须填写现价]]></message></required></col>
<col
 id="default35"
 name="fshangjiasj">
<defaultValue
 id="default36">
<expr
 id="default37"><![CDATA[wx.Date.now()]]></expr></defaultValue></col></rule></wx:restData></wx:model>
<wx:loading
 class="weui-loader-full {{$state.loadingNum &lt;= 0 ?'weui-loader-hide':''}}"
 style="z-index: 10001;"
 xmlns:bind="http://www.wex5.com/wx/bind"
 xmlns:catch="http://www.wex5.com/wx/event/catch"
 xmlns:on="http://www.wex5.com/wx/event/on"
 xmlns:wx="$UI/wxsys/comps">
<view
 class="ball-scale-ripple-multiple">
<view
 class="weui-loader-view"/>
<view
 class="weui-loader-view"/>
<view
 class="weui-loader-view"/>
<view
 class="weui-loader-view"/>
<view
 class="weui-loader-view"/></view></wx:loading>
<wx:inVisibleCompContainer
 id="inVisibleCompContainer">
<wx:user
 appPath="$UI/main"
 autoLoadUserInfo="true"
 autoLogin="true"
 id="user"
 useOpenid="false">
<wx:restData
 _created="true"
 className="uaa/user"
 columns="id,name,email,userName,phone,avatarUrl,description,data4,data5,data9,data15,data17,data2,data3,data6"
 id="restData"
 label="用户信息"
 owner="user"
 xmlns:wx="$UI/wxsys/comps">
<column
 id="default0"
 label="昵称"
 name="nickName"
 type="String"/>
<column
 id="default1"
 label="群组"
 name="group"
 type="Array"/>
<column
 id="default2"
 label="是否登录"
 name="isLogined"
 type="Boolean"/>
<rule
 id="rule">
<readonly
 id="default3">
<expr
 id="default4">true</expr></readonly></rule></wx:restData></wx:user></wx:inVisibleCompContainer>
<wx:scrollView
 id="scrollView"
 scroll-with-animation="true"
 scroll-y="true"
 style="height:523px;width:100%">
<wx:loading
 class="weui-loader-item {{$state.reachBottom ?'weui-loader-hide':''}}"
 id="loading"
 xmlns:bind="http://www.wex5.com/wx/bind"
 xmlns:catch="http://www.wex5.com/wx/event/catch"
 xmlns:on="http://www.wex5.com/wx/event/on"
 xmlns:wx="$UI/wxsys/comps">
<view
 class="ball-beat"
 id="view33">
<view
 class="weui-loader-view"
 id="view34"/>
<view
 class="weui-loader-view"
 id="view35"/>
<view
 class="weui-loader-view"
 id="view36"/></view></wx:loading>
<wx:row
 class="x-row"
 id="row"
 style="background-color:#FFFFFF;margin-bottom:10px">
<wx:col
 class="x-col x-col-fixed"
 id="col">
<wx:text
 id="text1">商品名：</wx:text></wx:col>
<wx:col
 class="x-col"
 id="col1">
<wx:input
 bind:ref="restData1.current.fmingcheng"
 id="input"
 placeholder=""/></wx:col></wx:row>
<view
 id="view">
<wx:row
 class="x-row"
 id="row1"
 style="background-color:#FFFFFF;margin-bottom:10px">
<wx:col
 class="x-col x-col-fixed"
 id="col3">
<wx:text
 id="text2">简介：</wx:text></wx:col>
<wx:col
 class="x-col"
 id="col4">
<wx:textarea
 bind:ref="restData1.current.fjianjie"
 class="weui-textarea WxTextarea weui-cell__bd"
 focus="true"
 id="textarea"
 maxlength="144"/></wx:col></wx:row>
<wx:row
 class="x-row"
 id="row2"
 style="background-color:#FFFFFF;margin-bottom:10px">
<wx:col
 class="x-col x-col-fixed"
 id="col6">
<wx:text
 id="text4">原价：</wx:text></wx:col>
<wx:col
 class="x-col"
 id="col9">
<wx:input
 bind:ref="restData1.current.fshichangj"
 id="input2"
 placeholder=""/></wx:col>
<wx:col
 class="x-col x-col-fixed"
 id="col10">
<wx:text
 id="text5">现价：</wx:text></wx:col>
<wx:col
 class="x-col"
 id="col7"
 xmlns:bind="http://www.wex5.com/wx/bind"
 xmlns:catch="http://www.wex5.com/wx/event/catch"
 xmlns:on="http://www.wex5.com/wx/event/on">
<wx:input
 bind:ref="restData1.current.fjiage"
 id="input3"
 placeholder=""/></wx:col></wx:row></view>
<wx:row
 class="x-row"
 id="row4"
 style="background-color:#FFFFFF;margin-bottom:10px">
<wx:col
 class="x-col x-col-fixed"
 id="col2">
<wx:text
 id="text3">库存：</wx:text></wx:col>
<wx:col
 class="x-col"
 id="col8">
<wx:text
 id="text7"
 style="color:#CCCCCC">1（暂不支持修改）</wx:text></wx:col></wx:row>
<wx:row
 class="x-row"
 id="row3"
 style="margin-bottom:8px;background-color:#FFFFFF">
<wx:col
 class="x-col x-col-fixed"
 id="col11">
<wx:text
 id="text6">原链接：</wx:text></wx:col>
<wx:col
 class="x-col"
 id="col12">
<wx:input
 bind:ref="restData1.current.fyuanlianj"
 id="input4"
 placeholder=""/></wx:col></wx:row>
<wx:attachmentImage
 audioNumb="0"
 class="{{$state.count == 1?'weui-uploader__img':''}}"
 count="9"
 id="attachmentImage"
 name="上传图片（至少一张）"
 sizeType="true"
 statics="false"
 style="background-color:#FFFFFF"
 videoNumb="0"
 xmlns:catch="http://www.wex5.com/wx/event/catch"
 xmlns:wx="$UI/wxsys/comps">
<view
 class="weui-cells"
 id="view1"
 wx:if="{{$state.count  &gt; 1&amp;&amp; $state.commonMode == false}}">
<view
 class="weui-cell"
 id="view2">
<view
 class="weui-cell__bd"
 id="view3">
<view
 class="weui-uploader"
 id="view4">
<view
 class="weui-uploader__hd"
 id="view5">
<view
 class="weui-uploader__title"
 id="view6">{{$state.name}}</view>
<view
 class="weui-uploader__info"
 id="view7">{{$state.attachments.length}} / {{$state.count}}</view></view>
<view
 class="weui-uploader__bd"
 id="view8">
<block
 id="default5"
 wx:for-item="_attachmentItem"
 wx:for="{{$state.attachments}}">
<view
 class="weui-uploader__file {{_attachmentItem.previewImageUrl == '//:0'?'weui-uploader__file_status':''}} {{$state.autoLayout}}"
 data-store-file-name="{{_attachmentItem.storeFileName}}"
 id="view9"
 style="position:relative;margin:.4em .4em 0 0;"
 wx:if="{{_attachmentItem.documentType=='image'}}">
<image
 class="{{$state.largeImage?'weui-uploader__large_img':'weui-uploader__img'}}"
 data-store-file-name="{{_attachmentItem.storeFileName}}"
 id="image"
 mode="{{$state.imageMode}}"
 on:tap="$comp.previewOrDeleteImage"
 src="{{_attachmentItem.previewImageUrl}}"/>
<view
 class="weui-badge"
 data-store-file-name="{{_attachmentItem.storeFileName}}"
 id="view10"
 on:tap="$comp.deleteImage"
 style="position: absolute;top: -.4em;right: -.4em;"
 wx:if="{{$state.deleBox}}">X</view>
<view
 class="weui-uploader__file-content"
 id="view11"
 wx:if="{{_attachmentItem.percent &lt; 100}}">{{_attachmentItem.percent}}%</view></view>
<view
 class="weui-uploader__file {{_attachmentItem.previewImageUrl == '//:0'?'weui-uploader__file_status':''}}  {{$state.autoLayout}}"
 data-store-file-name="{{_attachmentItem.storeFileName}}"
 id="view12"
 style="position:relative;margin:.4em .4em 0 0;"
 wx:elif="{{_attachmentItem.documentType=='video'}}">
<video
 bind:id="'myVideo'+_attachmentItem.storeFileName"
 class="weui-uploader__img"
 controls="{{true}}"
 direction="0"
 id="default6"
 on:fullscreenchange="$comp.screenchange"
 on:play="$comp.playVideoFullScreen"
 src="{{_attachmentItem.previewImageUrl}}"/>
<view
 class="weui-badge"
 data-store-file-name="{{_attachmentItem.storeFileName}}"
 id="view13"
 on:tap="$comp.deleteVideo"
 style="position: absolute;top: -.5em;right: -1em;"
 wx:if="{{$state.deleBox}}">X</view>
<view
 class="weui-uploader__file-content"
 id="view14"
 wx:if="{{_attachmentItem.percent &lt; 100}}">{{_attachmentItem.percent}}%</view></view>
<view
 class="weui-uploader__file {{_attachmentItem.previewImageUrl == '//:0'?'weui-uploader__file_status':''}}"
 data-store-file-name="{{_attachmentItem.storeFileName}}"
 id="view15"
 style="position:relative;margin:.4em .4em 0 0;"
 wx:elif="{{_attachmentItem.documentType=='record'}}">
<view
 class="recordModel {{$state.largeImage?'weui-uploader__large_img':'weui-uploader__img'}}"
 id="view16"
 on:tap="$comp.playVoiceAnimate">
<image
 class="recordImg"
 data-audioID="{{_attachmentItem.audioID}}"
 data-audioUrl="{{_attachmentItem.previewImageUrl}}"
 id="image1"
 src=""/>
<image
 class="recordSty"
 id="image2"
 src=""
 wx:if="{{$state.playPic== _attachmentItem.audioID+2}}"/>
<image
 class="recordSty"
 id="image3"
 src=""
 wx:if="{{$state.playPic== _attachmentItem.audioID+3}}"/>
<image
 class="recordSty"
 id="image4"
 src=""
 wx:if="{{$state.playPic== _attachmentItem.audioID+4}}"/>
<image
 class="recordSty"
 id="image5"
 src=""
 wx:if="{{$state.playPic== _attachmentItem.audioID+5}}"/>
<view
 class="second"
 id="view17"
 wx:if="{{_attachmentItem.duration}}">
<text
 id="default7">{{_attachmentItem.duration}}''</text></view></view>
<view
 class="weui-badge"
 data-store-file-name="{{_attachmentItem.storeFileName}}"
 id="view18"
 on:tap="$comp.deleteVideo"
 wx:if="{{$state.deleBox}}">X</view>
<view
 class="weui-uploader__file-content"
 id="view19"
 wx:if="{{_attachmentItem.percent &lt; 100}}">{{_attachmentItem.percent}}%</view></view></block>
<view
 class="{{$state.largeImage?'weui-uploader__large_input-box':'weui-uploader__input-box'}}"
 id="view20"
 style="margin-top:.4em"
 wx:if="{{$state.mode == 'upload' &amp;&amp; ($state.attachments.length &lt; $state.count)}}">
<view
 class="weui-uploader__input"
 id="view21"
 on:tap="$comp.chooseImage"
 style="padding-top:.4em"/></view></view></view></view></view></view>
<block
 id="default8"
 wx:if="{{$state.count == 1 &amp;&amp;  $state.commonMode == false}}">
<view
 class="{{$state.attachments[0]?'simpleImage':'weui-uploader__input-box'}}"
 id="view22"
 wx:if="{{$state.attachments[0].documentType !='video'}}">
<image
 class="{{$state.attachments[0].previewImageUrl == ''?'weui-uploader__file_status':''}}"
 id="image6"
 mode="{{$state.imageMode}}"
 on:tap="$comp.replaceImage"
 src="{{$state.attachments[0].previewImageUrl}}"
 style="width:100%;height:100%"/></view>
<view
 class="{{$state.attachments[0]?'simpleImage':'weui-uploader__input-box'}}"
 id="view23"
 wx:if="{{$state.attachments[0].documentType =='video'}}">
<video
 bind:id="'onlyVideo'+$state.attachments[0].storeFileName"
 class="simpleVideo"
 controls="{{true}}"
 direction="0"
 id="default9"
 on:fullscreenchange="$comp.screenchange"
 on:play="$comp.playVideoFullScreen"
 src="{{$state.attachments[0].previewImageUrl}}"/></view></block>
<view
 class="weui-uploader__img"
 id="view24"
 wx:if="{{$state.commonMode}}">
<image
 id="image7"
 mode="{{$state.imageMode}}"
 on:tap="$comp.replaceImage"
 src="{{$state.commonModeImg ? $state.commonModeImg: $state.attachments[0].previewImageUrl}}"
 style="height:100%;width:100%"/></view>
<view
 class="{{$state.chooseRecord?'popUpView':'popViewHigh'}}"
 id="view25">
<view
 class="closePopUp"
 id="view26"
 on:tap="$comp.closeModel">
<text
 id="default10">X</text></view>
<view
 class="contentView"
 id="view27">
<view
 class="talkView"
 id="view28">
<text
 id="default11">{{$state.recordFont}}</text></view>
<view
 class="recordView"
 id="view29"
 on:touchend="$comp.speakTouchUp"
 on:touchstart="$comp.speakTouchDown"
 wx:if="{{$state.recordMode == 'touch'}}">
<image
 class="record"
 id="image8"
 src=""/></view>
<view
 class="recordView"
 id="view30"
 on:tap="$comp.startAndendRecord"
 wx:if="{{$state.recordMode == 'click'}}">
<image
 class="record"
 id="image9"
 src=""/></view></view></view>
<audio
 controls="{{false}}"
 id="myAudio"
 on:ended="$comp.audioEnd"
 style="position:absolute"/>
<block
 id="default12">
<view
 class="speak-auto"
 id="view31"
 wx:if="{{$state.isSpeaking}}">
<view
 class="speak-style"
 id="view32">
<image
 class="sound-style"
 id="image10"
 src=""/>
<image
 class="sound-style"
 id="image11"
 src=""
 wx:if="{{$state.pictures==2}}"/>
<image
 class="sound-style"
 id="image12"
 src=""
 wx:if="{{$state.pictures==3}}"/>
<image
 class="sound-style"
 id="image13"
 src=""
 wx:if="{{$state.pictures==4}}"/>
<image
 class="sound-style"
 id="image14"
 src=""
 wx:if="{{$state.pictures==5}}"/></view></view></block></wx:attachmentImage></wx:scrollView>
<wx:button
 class="wx-btn"
 id="button"
 on:tap="{&quot;operation&quot;:&quot;commonOperation.saveReturn&quot;,&quot;args&quot;:{&quot;data&quot;:&quot;restData1&quot;,&quot;index&quot;:&quot;0&quot;}}"
 style="position:fixed;width:100%;bottom:0px"
 type="primary">
<wx:icon
 id="icon"
 size="15"
 type="wx-btn-icon"/>
<view
 class="wx-btn-label"
 id="view37">发布</view></wx:button></wx:page>___js___:import PageImpl from "$UI/wxsys/lib/base/pageImpl";var app = getApp();export default class IndexPage extends PageImpl {constructor(...args){super(...args);}}